﻿using Mengsk.ProxyDelivery.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace Mengsk.ProxyDelivery.App.UI.Order
{
    class OrderGoodsVM : DependencyObject
    {
        public static readonly DependencyProperty CheckTimeProperty = DependencyProperty.Register("CheckTime", typeof(DateTime), typeof(OrderGoodsVM));
        public static readonly DependencyProperty CheckCommentProperty = DependencyProperty.Register("CheckComment", typeof(string), typeof(OrderGoodsVM));
        public static readonly DependencyProperty PriceProperty = DependencyProperty.Register("Price", typeof(double), typeof(OrderGoodsVM));

        public DateTime CheckTime { get { return (DateTime)this.GetValue(CheckTimeProperty); } set { this.SetValue(CheckTimeProperty, value); } }

        public string CheckComment { get { return (string)this.GetValue(CheckCommentProperty); } set { this.SetValue(CheckCommentProperty, value); } }

        public double Price { get { return (double)this.GetValue(PriceProperty); } set { this.SetValue(PriceProperty, value); } }

        public string Url { get; set; }

        public string Action { get { return "更新"; } }

        public OrderGoods Source { get; set; }

        public OrderGoodsVM(OrderGoods source, string url)
        {
            this.Url = url;
            this.Source = source;
            this.CheckComment = source.CheckComment;
            this.CheckTime = source.CheckTime;
        }
    }
}
